#!/bin/sh
#
#  Make the stupid bacula.def file so that we don't have to do it
#    manually
#
#   Kern Sibbald, June 2007
#
 
echo "LIBRARY bacula_cats.dll"
echo "EXPORTS"
echo " "

TOPDIR=`(cd ../../..;pwd)`
TOPDIR=${DEPKGS:-${TOPDIR}}
NM=i686-w64-mingw32-nm

OBJS="sql.o sql_create.o sql_delete.o sql_find.o sql_get.o \
      sql_list.o sql_update.o bvfs.o sql_glue.o cats.o postgresql.o"

#
# The data could be automated too        
#
DATA="\
      client_backups \
      list_pool \
      drop_deltabs \
      create_deltabs \
      sel_JobMedia \
      uar_list_jobs \
      uar_file \
      uar_count_files \
      uar_sel_files \
      uar_del_temp \
      uar_del_temp1 \
      uar_create_temp \
      uar_create_temp1 \
      uar_last_full \
      uar_full \
      uar_inc \
      uar_list_temp \
      uar_sel_all_temp1 \
      uar_sel_fileset \
      uar_jobid_fileindex \
      uar_dif \
      uar_sel_all_temp \
      uar_count_files \
      uar_jobids_fileindex \
      uar_jobid_fileindex_from_dir \
      uar_jobid_fileindex_from_table \
      cleanup_created_job \
      cleanup_running_job \
      get_restore_objects \
      get_restore_objects \
      uar_sel_filesetid \
      create_delindex \
      expired_volumes \
      uap_upgrade_copies_oldest_job \
      uar_print_jobs \
      get_restore_objects \
      uar_sel_jobid_temp" 


cd obj32/cats_postgresql
for i in ${OBJS}; do \
   echo "; $i"; \
   ${NM} $i | grep "^[0-9a-f]* T _" | cut -c13-; \
   echo " "; \
done

for i in ${DATA}; do \
   echo "$i DATA"; \
done
